tx.success();
tx.finish();
tx = secondSlave.beginTx();
secondSlave.createNode();
tx.success();
tx.finish();
}
finally
{
try ( Transaction tx = secondSlave.beginTx() )
{
secondSlave.createNode();
tx.success();
}
}
finally